﻿/**********************************************************************************
 * Project Name   :   
 * Remarks        :  
 * Interface Name :  IMainViewModel   
 * Version        :  v1.0.0.0 
 * Author         :  Joey Liang 
 * Description    : 
 * Created Time   :  2013/8/14 22:23:41
 * Update Man     :  Joey Liang
 * Update Time    :  2013/8/14 22:23:41
************************************************************************/

using JoeyLibs.IdleStartMenu.Model;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;

namespace JoeyLibs.IdleStartMenu.IViewModel
{
    public interface IMainViewModel
    {
        /// <summary>
        /// 是否可以打开多个进程
        /// </summary>
        bool IsMultiProcessOpened { get; set; }

        /// <summary>
        /// 获取所有已打开的进程
        /// </summary>
        IList<IProcessViewModel> ProcessesOpened { get; }

        /// <summary>
        /// 配置文件中存在的所有进程对象
        /// </summary>
        IList<ProcessModel> ProcessModels { get; }

        /// <summary>
        /// 根据进程对象创建进程并启动
        /// </summary>
        /// <param name="model"></param>
        void CreateProcess(ProcessModel model);

        /// <summary>
        /// 提交所有更新
        /// </summary>
        void Update();

        /// <summary>
        /// 更新排序字段
        /// </summary>
        /// <param name="model">更新的实体</param>
        /// <param name="newOrderNum">新的排序值</param>
        void UpdateOrder(ProcessModel model, int newOrderNum);

        /// <summary>
        /// 导入设置
        /// </summary>
        /// <param name="fileName">导入文件路径名</param>
        void ImportSetting(string fileName);

        /// <summary>
        /// 导出设置
        /// </summary>
        /// <param name="fileName">导出文件路径名</param>
        void ExportSetting(string fileName);

        /// <summary>
        /// 恢复初始化
        /// </summary>
        void ResetInit();

        /// <summary>
        /// 刷新配置数据
        /// </summary>
        void RefreshData();
    }
}
